package com.xiyi.shouxin.entity.user.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.user.Cpr;

public class CprMapper implements RowMapper<Cpr> {

    @Override
    @Nullable
    public Cpr mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        Cpr cpr = new Cpr();
        if (rs == null) {
            return cpr;
        }
        cpr.setId(rs.getLong("id"));
        cpr.setUid(rs.getLong("uid"));
        cpr.setDepth(rs.getDouble("depth"));
        cpr.setQualified(rs.getString("qualified"));
        cpr.setPracticeId(rs.getLong("practice_id"));
        cpr.setTime(rs.getInt("time"));
        cpr.setCreatedAt(rs.getString("created_at"));
        cpr.setMillisecond(rs.getLong("millisecond"));
        return cpr;
    }
}
